package afcp.alumni.dao;

import afcp.alumni.dao.base.Dao;
import afcp.alumni.model.db.Member;

public interface MemberDao extends Dao<Member> {

//	Member find(Login field);
//
//	/**
//	 * Returns a list of all the entities of this kind (<em>T</em>) in the
//	 * datastore.
//	 * 
//	 * @return All the entities of kind <em>T</em> in datastore.
//	 */
//	public List<Member> findAll();
//
//	public SearchResult<Member> findOnePage(int page, int perPage);
//
//	/**
//	 * <p>
//	 * Find and return the entity with the given id (the string form).
//	 * </p>
//	 * <p>
//	 * Warning: The returned entity is detached. For instance, it can't be used
//	 * to remove it from the datastore.
//	 * </p>
//	 * 
//	 * @param id
//	 * @return
//	 */
//	public Member find(String id);
//
//	public Member findFromKeyString(String key);
//
//	/**
//	 * <p>
//	 * Find and return the entity with the unique field.
//	 * </p>
//	 * <p>
//	 * Warning: The returned entity is detached. For instance, it can't be used
//	 * to remove it from the datastore.
//	 * </p>
//	 * 
//	 * @param id
//	 * @return
//	 */
//	public Member find(
//			Login field);
//
//	/**
//	 * App Engine note: the performances are bad with the current implementation
//	 * <code>query.setFilter(":p.contains(key)");</code> - one query for each
//	 * key. Please avoid using this method if possible.
//	 * 
//	 * @param ids
//	 * @param page
//	 * @param perPage
//	 * @return
//	 */
//	public SearchResult<Member> findFromKeyStrings(List<String> ids,
//			int page, int perPage);
//	
////	public abstract List<Member> findFromKeyString(List<Member> keys);
//
//	/**
//	 * App Engine note: the performances are bad with the current implementation
//	 * <code>query.setFilter(":p.contains(key)");</code> - one query for each
//	 * key. Please avoid using this method if possible.
//	 * 
//	 * @param ids
//	 * @param page
//	 * @param perPage
//	 * @param totalResults
//	 *            if the total number of results is already known. If not, you
//	 *            may prefer to use {@link #findFromKeyStrings(List, int, int)}
//	 * @return
//	 */
//	public SearchResult<Member> findFromKeyStrings(List<String> ids,
//			int page, int perPage, long totalResults);
//
//	public boolean exists(Member entity);
//
//	public SearchResult<Member> search(String queryString, int page, int perPage);
//
//	/**
//	 * Adds the given entity to the datastore. Its Id must be set and not be
//	 * already used in the datastore. If the id is already used, an error log is
//	 * writen.
//	 * 
//	 * @param entity
//	 *            The entity to add to the datastore.
//	 * @return True if the entity was successfully added to the datastore, false
//	 *         otherwise.
//	 */
//	public boolean addOrUpdate(Member entity);
//	
//	public boolean updateNoReindexingNoValidation(Member entity);
//
//	public boolean addOrUpdate(Member entity, boolean indexes);
//
//	public boolean addToIndex(Member entity);
//
//	public boolean addOrUpdate(List<Member> entities);
//
//	public boolean addToIndex(List<Member> entities);
//
//	/**
//	 * Removes the entity with the given id in the string form.
//	 * 
//	 * @param id
//	 *            The id of the entity to delete. The method
//	 *            {@link KeyFactory#stringToKey(String)} is used to find the key
//	 *            from this String. It means that this id must have been
//	 *            generated using the method {@link KeyFactory#keyToString(Key)}
//	 *            .
//	 * @return
//	 */
//	public Member removeFromKeyString(String id);
//
//	/**
//	 * Removes the entity with the given key String ({@link String} form of its
//	 * {@link Key}) from the index. To get a String from a Key, you may want to
//	 * use {@link KeyFactory#keyToString(Key)}.
//	 * 
//	 * @param key
//	 * @return
//	 */
//	public boolean removeFromIndex(String key);
//	
//	public void remove(Member entity);
//
//	/**
//	 * Removes the entity with the given id which is the {@link String} form of
//	 * the <code>long</code> key id. To get a {@link String} id from a
//	 * {@link Key}, you may want to use {@link Key#getName()}. To convert a long
//	 * to a string id, you may want to create a key with
//	 * {@link KeyFactory#createKey(String, long)} and then get the String id.
//	 * 
//	 * @param id
//	 *            The {@link String} form of the id. Use the {@link KeyFactory}
//	 *            and the {@link Key} objects to convert the key id from long to
//	 *            {@link String}.
//	 * @return
//	 */
//	public Member remove(String id);
//
//	public boolean remove(List<Member> entities);
//
//	public boolean removeFromIndex(List<String> ids);
//
//	public boolean removeAll();
//
//	public boolean removeAllFromIndex();
//
//	public boolean clearIndex();
//
//	/**
//	 * Updates an entity still attached to the datastore.
//	 * 
//	 * @param entity
//	 *            The entity to update in the datastore
//	 * @return
//	 */
//	public boolean update(Member entity);
//
//	// public abstract long getTotalResults();
//
//	/**
//	 * <p>
//	 * Get the object that can be used to do a transaction. Call then
//	 * {@link Transaction#begin()} to start the transaction,
//	 * {@link Transaction#commit()} to commit (end) the transaction and
//	 * {@link Transaction#rollback()} to rollback on finally block if
//	 * transaction is active ({@link Transaction#isActive()}).
//	 * </p>
//	 * <p>
//	 * Transactions are subject to restrictions on datastore (ie they might
//	 * throw {@link Exception}s) and might affect concurrency. So be careful
//	 * when using it.
//	 * </p>
//	 * 
//	 * @return The {@link Transaction} object that will be used to call
//	 *         {@link Transaction#begin()}, {@link Transaction#commit()},
//	 *         {@link Transaction#isActive()} and {@link Transaction#rollback()}
//	 *         methods.
//	 */
//	public Transaction newTransactionObject();
//
//	public void beginTransaction(Transaction txn);
//
//	public void commitTransaction(Transaction txn);
//
//	public void rollbackTransaction(Transaction txn);

}
